package com.echat.messagesender.sender.service;

import com.echat.messagesender.sender.model.EmailTemplate;
import com.echat.messagesender.sender.model.EmailTemplateMapping;
import com.echat.messagesender.sender.model.SmsTemplate;
import com.echat.messagesender.sender.model.SmsTemplateMapping;

import java.util.List;
import java.util.Map;

/**
 * Created by chenmohan on 2018/09/10
 *
 * @description
 */
public interface TemplateService {

    long addEmailTemplate(EmailTemplate emailTemplate);

    long addSmsTemplate(SmsTemplate smsTemplate);

    List<EmailTemplate> listAllEmailTemplates();

    List<SmsTemplate> listAllSmsTemplates();

    EmailTemplate getEmailTemplateById(Long templateId);

    SmsTemplate getSmsTemplateById(Long templateId);

    void addEmailTemplateMapping(EmailTemplateMapping mapping);

    void addSmsTemplateMapping(SmsTemplateMapping mapping);

    List<EmailTemplateMapping> getEmailTemplateMappingByTemplateId(Long templateId);

    List<SmsTemplateMapping> getSmsTemplateMappingByTemplateId(Long templateId);

    /**
     * 指定邮件模板id查询模板映射
     * @param templateId    邮件模板id
     * @return  相应平台的tempaleId
     */
    EmailTemplateMapping getEmailTemplateMappingId(Long templateId,Long platformId);

    /**
     * 指定短信模板id查询模板映射
     * @param templateId    短信模板id
     * @return  相应平台的tempaleId
     */
    SmsTemplateMapping getSmsTemplateMappingId(Long templateId, Long platformId);

}
